package com.servlet;

import hyl.core.AIni;
import hyl.core.Amy;
import hyl.ext.web.ms.TMsB;

public class My extends AIni {
	protected static My my;



	// protected static MyKafka _kfkp;
	// public static MyDB _timerdb1= MyDB.createCommitDB(DB1);
	private My() {
	
		//TMsB.getInstance() ;
		// _rd = new RdMapString("redis1",11);
	}

	/*
	 * public static MyKafka getKfkP() { return _kfkp; }
	 */
	/**
	 * my 实例化 启动
	 * 
	 * @return
	 */
	public static My getInstance() {
		// String path=MyPath.getLastPathOfClassLoader(My.class.getClassLoader());
		// MyConfig conf=MyConfig.deserial(path);
		if (my == null) {
			my = new My();
		}
		// 嵌入微服务组件,监听各个微服务发来的心跳
	
		// MyConfig.serial(path);
		// _kfkp = MyKafka.getInsProducer();
		// getRewardService();
		return my;
	}


	public static void reset() {
		my = new My();
	
		
	}


	
	
	
	public static void exit() {
		closeAllThreads();
	
		
	}

	public static void onErrClose() {
		onExit = new Runnable() {
			public void run() {
				Log.info("异常关闭触发事件");
				exit();
			}
		};
	}

}
